#include "StdAfx.h"
#include "GraphicSubTitle.h"

IMPLEMENT_DYNAMIC(GraphicSubTitle,CWnd)

GraphicSubTitle::GraphicSubTitle(void)
{
}

GraphicSubTitle::~GraphicSubTitle(void)
{
}
BEGIN_MESSAGE_MAP(GraphicSubTitle, CWnd)
	ON_WM_CREATE()
	ON_WM_SIZE()
	ON_WM_ERASEBKGND()
END_MESSAGE_MAP()

int GraphicSubTitle::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  Add your specialized creation code here

	return 0;
}

void GraphicSubTitle::OnSize(UINT nType, int cx, int cy)
{
	CWnd::OnSize(nType, cx, cy);
	CWnd *parent = GetParent();
	CRect rect;
	this->GetClientRect(&rect);
	parent->GetClientRect(&rect);
	CRect rtViewArea(0,rect.bottom-rect.top-250,rect.right-200, rect.bottom-rect.top-150);

	// TODO: Add your message handler code here
}

BOOL GraphicSubTitle::OnEraseBkgnd(CDC* pDC)
{
	// TODO: Add your message handler code here and/or call default
	CRect rect;
	GetClientRect(&rect);
	CBrush myBrush(COLOR_SUBTITLE_AREA);    // dialog background color
	CBrush *pOld = pDC->SelectObject(&myBrush);
	BOOL bRes  = pDC->PatBlt(0, 0, rect.Width(), rect.Height(), PATCOPY);
	pDC->SelectObject(pOld);    // restore old brush
	return bRes;
///



	return CWnd::OnEraseBkgnd(pDC);
}
